<?php
/**
 * flile:CommonModule.php
 * author:mirgong
 * create_time:2021/10/19 16:38
 * e_mail:451716286@qq.com
 */

namespace App\RpcServices;

use EasySwoole\Rpc\Service\AbstractServiceModule;

class CommonModule extends AbstractServiceModule
{
    function moduleName(): string
    {
        // TODO: Implement moduleName() method.
        return "CommonModule";
    }

    public function mailBox(){
        // 获取client 全局参数
        $this->request()->getClientArg();
        // 获取参数
        $this->request()->getArg();
        $this->response()->setResult([
           [
               "mailId"=>"100001",
               "mailTitle"=>"系统消息",
           ],
           [
               "mailId"=>"100001",
               "mailTitle"=>"系统消息1",
           ]

        ]);
        $this->response()->setMsg("get mail list success");
    }

    public function serverTime()
    {
        $this->response()->setResult(time());
        $this->response()->setMsg("get server time server");

    }


}